package cloudEntity.enumation;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * @program: Smart School
 * @ClassName NewsTypeEnum
 * @description:
 * @author: 陈智博
 * @create: 2025-04-28 16:21
 * @Version 1.0
 **/
@Getter
public enum NewsTypeEnum {

    ShcoolNews("学校新闻",1),
    CollegeDynamics("公告通知",2),
    OpenTender("招标采购",3),
    CurrnetNews("时事新闻",4);

    private final String sysNewsTypeName;
    private final Integer sysNewsType;


    NewsTypeEnum(String sysNewsTypeName, Integer sysNewsType) {
        this.sysNewsTypeName = sysNewsTypeName;
        this.sysNewsType = sysNewsType;
    }

    public static String getDescriptionByValue(Integer value) {
        for (NewsTypeEnum status : NewsTypeEnum.values()) {
            if (status.getSysNewsType().equals(value)) {
                return status.getSysNewsTypeName();
            }
        }
        return null; // 或者抛出异常，根据需求而定
    }

}
